package com.tony.blog.server.service.web;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tony.blog.api.utils.PageUtil;
import com.tony.blog.model.entity.BlogEntity;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: BlogService
 * @Auther: 皮蛋布丁
 * @Date: 2021/08/15/19:05
 * @Description:
 */
public interface BlogService extends IService<BlogEntity> {
    
    /**
    * @Description: queryPage 获取首页数据列表信息(向下滚动分页)
    * @Param: [paramMap]
    * @return: com.tony.blog.api.utils.PageUtil
    * @Author: 皮蛋布丁
    * @Date: 2021/8/15 19:07
    */
    PageUtil queryPage(Map<String, Object> paramMap);

    /**
    * @Description: commonManageSingleBlog 单独处理每条微博的额外的数据信息：微博图片、博主信息、是否已点赞/收藏/转发等信息
    * @Param: [blogEntity]
    * @return: void
    * @Author: 皮蛋布丁
    * @Date: 2021/8/15 19:15
    */
    void commonManageSingleBlog(BlogEntity blogEntity);

    /**
    * @Description: countByForwardBlog 获取转发博文数量
    * @Param: [userId, blogId]
    * @return: java.lang.Integer
    * @Author: 皮蛋布丁
    * @Date: 2021/9/10 14:27
    */
    Integer countByForwardBlog(Long userId, Integer blogId);

    PageUtil queryPagePraises(Map<String, Object> params);

    /**
    * @Description: queryPageCollects 获取我收藏的博文列表(分页)
    * @Param: [paramMap]
    * @return: com.tony.blog.api.utils.PageUtil
    * @Author: 皮蛋布丁
    * @Date: 2021/9/16 10:12
    */
    PageUtil queryPageCollects(Map<String, Object> paramMap);

    /**
    * @Description: commonManageBlog 通用处理博文列表
    * @Param: [list]
    * @return: java.util.List<com.tony.blog.model.entity.BlogEntity>
    * @Author: 皮蛋布丁
    * @Date: 2021/9/16 11:03
    */
    List<BlogEntity> commonManageBlog(List<BlogEntity> list);

    /**
    * @Description: queryPageAdmin 获取博文列表(分页、模糊)
    * @Param: [params]
    * @return: com.tony.blog.api.utils.PageUtil
    * @Author: 皮蛋布丁
    * @Date: 2021/9/29 10:15
    */
    PageUtil queryPageAdmin(Map<String, Object> params);

    /**
    * @Description: deleteEntity 根据id删除博文
    * @Param: [ids]
    * @return: java.lang.Integer
    * @Author: 皮蛋布丁
    * @Date: 2021/9/29 11:17
    */
    Integer deleteEntity(List<Integer> ids);

    /**
    * @Description: activeEntity 根据id批量屏蔽/恢复博文
    * @Param: [ids]
    * @return: java.lang.Integer
    * @Author: 皮蛋布丁
    * @Date: 2021/9/29 11:45
    */
    Integer activeEntity(List<Integer> ids);
}
